package tmproject.hlhj.fhp.cartrans.presenter

import android.content.Context
import com.example.mymvp.BasePresenter
import tmproject.hlhj.fhp.cartrans.IView.LearnView
import tmproject.hlhj.fhp.cartrans.IView.ReViewView
import tmproject.hlhj.fhp.cartrans.javaBean.ClassListBean
import tmproject.hlhj.fhp.cartrans.javaBean.ExamTImesBean
import tmproject.hlhj.fhp.cartrans.javaBean.ReViewListBean
import tmproject.hlhj.fhp.cartrans.modules.LearnModule
import tmproject.hlhj.fhp.cartrans.modules.ReViewModule

/**
 * Created by Administrator on 2018/8/26/026.
 */
class ReViewPresenter : BasePresenter<ReViewModule, ReViewView>(), ReViewModule.OnLearnLisener {

    override fun classResp(reViewListBean: ReViewListBean) {
        view?.setClassList(reViewListBean)

    }

    override fun gotExamTimes(examTImesBean: ExamTImesBean) {
        view?.setExamTimes(examTImesBean)
    }

    fun getExamTimes(token: String?,context: Context){
        module.getExamTimes(token, context)
    }
    override fun createModule() {
        module= ReViewModule()
        module.listener=this
    }
    fun getLearnList(c: Context,token:String?,page:Int){
        module.getReviewList(c,token,page)
    }

    override fun noMore() {
        view?.noMore()
    }
}